package top.codecrab.cloudalibaba.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.codecrab.cloudalibaba.mapper.AccountMapper;
import top.codecrab.cloudalibaba.service.AccountService;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * @author codecrab
 * @since 2021年05月24日 10:23
 */
@Slf4j
@Service
public class AccountServiceImpl implements AccountService {

    @Resource
    private AccountMapper accountMapper;

    @Override
    public void decrease(Long userId, BigDecimal money) {
        log.info("-------账户微服务扣减余额-------");
        accountMapper.decrease(userId, money);
    }
}
